package com.bjsdzk.collector.entity.response;

import lombok.Data;

import java.io.Serializable;

/**
 * @author sl
 */
@Data
public class Result<T> implements Serializable {
    private static final long serialVersionUID = 1257916683118688101L;
    private Integer code;
    private String msg;
    private T data;


    public Result() {
    }

    public Result(T data) {
        this.code = ResultCode.SUCCESS.getCode();
        this.msg = ResultCode.SUCCESS.getMsg();
        this.data = data;
    }

    public Result(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Result(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

}
